<?php

class Zend_View_Helper_Menu extends Zend_View_Helper_Abstract
{
    function menu($menu)
    {
        $out = '<ul>';
        foreach ($menu as $record) {
            $out .= '<li>';

            $out .= $record['title'];
            if (count($record['children'])) {
                $out .= $this->menu($record['children']);
            }

            $out .= '</li>';
        }
        $out .= '</ul>';

        return $out;
    }
}
